home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / moves.arc / TESTMOVE.PAS < prev   
Pascal/Delphi Source File  |  1991-01-09  |  936b  |  48 lines

  1. { TestMove.pas - Very simple test for MOVES.TPU              ver 1.0, 7-12-88 }
  2. { The use of either Move16 or Move16n gives the exact same results            }
  3. program TestMove;
  4.  
  5. uses Crt,Moves;
  6.  
  7. type
  8.   CharArray = array[0..79] of char;
  9.  
  10. var
  11.   Array1,Array2: CharArray;
  12.   i,j: word;
  13.  
  14. procedure ShowNumberLine;
  15. begin
  16.   for j:=1 to 4 do
  17.     begin
  18.       HighVideo;
  19.       Write ('0123456789');
  20.       LowVideo;
  21.       Write ('0123456789');
  22.     end;
  23. end;
  24.  
  25. procedure DumpArray (VAR TheArray: CharArray);
  26. begin
  27.   for i:=0 to 79 do
  28.     Write (TheArray[i]);
  29. end;
  30.  
  31. begin
  32.   TextAttr:=Lightgray;
  33.   ClrScr;
  34.   fillchar (Array1,80,'1');
  35.   fillchar (Array2,80,'2');
  36.  
  37.   Move16 (Array1[ 2],Array2[ 2],3);
  38.   Move16 (Array2[20],Array1[20],3);
  39.  
  40.   Writeln ('Contents of Array1:');
  41.   DumpArray (Array1);
  42.   ShowNumberLine;
  43.   Writeln;
  44.   Writeln ('Contents of Array2:');
  45.   DumpArray (Array2);
  46.   ShowNumberLine;
  47. end.
  48.